//
//  AgilityTests.m
//  AgilityTests
//
//  Created by Dominique d'Argent on 15.03.11.
//  Copyright 2011 Nicky Nubbel. All rights reserved.
//

#import "AgilityTests.h"
#import "GameData.h"


@implementation AgilityTests

- (void)setUp
{
    [super setUp];
    
    // Set-up code here.
}

- (void)tearDown
{
    // Tear-down code here.
    
    [super tearDown];
}

- (void)testGameDataSingleton {
    STAssertEquals([GameData sharedGameData], [GameData sharedGameData], @"GameData singleton fails.");
}

- (void)testDictionaries {
    NSMutableDictionary *firstDict = [NSMutableDictionary dictionary];
    NSMutableDictionary *secDict   = [NSMutableDictionary dictionary];
    
    [secDict setObject:@"Hello World" forKey:@"world"];
    [firstDict setObject:secDict forKey:@"hello"];
    
    NSString *str = [firstDict valueForKeyPath:@"hello.world"];
    
    STAssertEquals(str, @"Hello World", nil);
}

- (void)testTrigonometry {
    NSLog(@"cos(0) = %.5f", cosf(0));
    NSLog(@"cos(PI/2) = %.5f", cosf(M_PI_2));
    NSLog(@"cos(PI) = %.5f", cosf(M_PI));
    
    
    NSLog(@"cos(90) = %.5f", cosf(90));
}

@end
